Skip to content

Update to LLVM 23#158734

Open
nikic wants to merge 8 commits into
rust-lang:mainfrom
nikic:llvm23
Open

Update to LLVM 23#158734
nikic wants to merge 8 commits into
rust-lang:mainfrom
nikic:llvm23

Conversation

@nikic

@nikic nikic commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

View all comments

Changes in this PR (apart from the LLVM update):

  • Updated cov-map tests due to minor ordering changes introduced in llvm/llvm-project@5931034. The affected tests are limited to LLVM >= 23 now.
  • Set LLVM_VERSIONED_DYLIB_NAME_ON_DARWIN=OFF, which restores the previous unversioned naming of the LLVM dylib on Darwin. I expect we'll want to change this for consistency with Linux, but given the amount of trouble Darwin dylibs have caused in the past, I'm not trying to do it in this PR.
  • Distribute the llvm-project/libc subproject, which is now a build dependency of LLVM.
  • Pull in f128 Windows ABI changes from adjust f128 windows abi for LLVM 23 #158778. These need to land in sync with the LLVM update (as ABI of libcalls is controlled by LLVM, not our ABI lowering).
  • Disable RISCV backend on dist-i686-mingw, because the build OOMs on a large generated file. This is a temporary measure until host tools are removed by Drop tier 2 i686-pc-windows-gnu host tools compiler-team#1020.
  • The llvm-project fork includes a new downstream patch for mingw: rust-lang/llvm-project@b89cd8e It works around mingw having broken TLS prior to GCC 16. (We're currently on GCC 14.)

Issues:

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 3, 2026
@nikic

nikic commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 3, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 3, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

💔 Test for b003a3f failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jul 13, 2026
@nikic

nikic commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 0259978 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@nikic

nikic commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 14, 2026
@rust-bors

rust-bors Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 4973bfc failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 20, 2026
Update to LLVM 23


try-job: dist-i686-mingw
@nikic

nikic commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

The include-blob regression is due to escape_string_symbol(), where that particular benchmark spends basically all the time. Having trouble creating a reproducer for that though, the LTO/PGO really doesn't make it easy to independently reproduce optimization issues.

Maybe it would be easier to just reimplement that function in rustc, the way this currently happens via escape_default() and layers of iterators and formatters is horrible.

@rust-bors

rust-bors Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: af3dce7 (af3dce70e26ccb50ebf15fe1f2a3d83cea5764b7)
Base parent: 14ead7d (14ead7d3d509f50efe9afb84673e65885dfd4d07)

@nikic

nikic commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Tried that in #159609, it does seem like even a naive implementation is better than using the std iterator with to_string()...

@nikic
nikic marked this pull request as ready for review July 22, 2026 08:42
@rustbot

rustbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in coverage tests.

cc @Zalathar

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

rustc_codegen_cranelift is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_cranelift instead.

cc @bjorn3

Warning

If you are changing how CI LLVM is built or linked, make sure to bump
src/bootstrap/download-ci-llvm-stamp.

cc @jieyouxu

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 22, 2026
@rustbot

rustbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 74 candidates
  • Random selection from 18 candidates

@rustbot

rustbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

Comment thread compiler/rustc_codegen_cranelift/src/abi/mod.rs
@rust-bors

This comment has been minimized.

nikic and others added 6 commits July 22, 2026 21:57
There is a minor change in sorted order due to:
llvm/llvm-project@5931034
We probably want to change this to align with Linux, but for now
keep the old behavior.
It's a dependency of LLVM now.
We can start matching the codegen introduced by LLVM at [1]. This alone
isn't enough to make f128 functional on the platform because libcalls
use the LLVM ABI.

Current behavior originally introduced in RUST-128388.

[1]: llvm/llvm-project@aa47e59
@rustbot

rustbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@nikic

nikic commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

r? @cuviper

@rustbot rustbot assigned cuviper and unassigned davidtwco Jul 22, 2026
Comment thread compiler/rustc_codegen_cranelift/src/abi/mod.rs Outdated

@bjorn3 bjorn3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cg_clif changes LGTM

View changes since this review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc F-autodiff `#![feature(autodiff)]` perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants